home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / telecomm / bbs / techtraplist.lha / traplist.rexx
Encoding:
OS/2 REXX Batch file  |  1994-11-29  |  1.9 KB  |  68 lines

  1. /*
  2.  * Original by Tim Aston for TransAmiga. TechnoBBS version by Janne Siren.
  3.  *
  4.  * Useful for those running FidoNet with TrapDoor.  Looks up the specified
  5.  * node in the nodelist and displays some info about it (only users with
  6.  * access 255 can see the passwords and costs).
  7.  *  
  8.  * NOTE: TrapDoor's traplist.library must be in Libs:
  9.  *
  10.  * MainMenu.dat:
  11.  *
  12.  * Command "NODE" (G: N:2)
  13.  * {
  14.  *    dos("rx >NIL: BBS:Rexx/TrapList.rexx \(node()) \(arg(1))");
  15.  * }
  16.  *
  17.  */
  18.  
  19.     agr = Arg(1)
  20.  
  21.     Parse Var agr ln " " nd
  22.  
  23.     CLS    = D2C(12)
  24.     CRLF    = D2C(10)||D2C(13)
  25.  
  26.     LineName = Con_LineActive(ln)
  27.  
  28.     If LineName = "" Then Exit 10
  29.  
  30.     Address Command
  31.     Address Value LineName
  32.  
  33.     If nd = "" Then Do
  34.         nd = AskInput(ln, "Enter node number: ", "", 40)
  35.         SendModem CRLF
  36.     End
  37.  
  38.     If ~Show("Libraries", "traplist.library") Then Do
  39.         If ~AddLib("traplist.library", 0, -30, 0) Then Do
  40.             SendModem CRLF||"Unable to open traplist.library"||CRLF||CRLF
  41.             Exit 20
  42.         End
  43.     End
  44.  
  45.     data = FindNode(nd, "All", "NodeList:")
  46.     ok = Left(data, 2)
  47.     data = DelStr(data, 1, 2)
  48.  
  49.     If ~ok Then Do
  50.         SendModem ""||data||"!"||CRLF||CRLF
  51.         Exit 10
  52.     End
  53.  
  54.     node. = ""
  55.     bar = "================================================================================"
  56.  
  57.     Parse Var data node.Addr "," node.Sysop "," node.System "," node.Phone "," node.City "," node.Password "," node.Baud "," node.Cost "," node.Region "," node.HUB "," node.Flags
  58.  
  59.     SendModem node.System||" ("||node.Addr||")"||CRLF||""||Left(bar, Length(node.System||" ("||node.Addr||")"))||CRLF||" SYSOP: "||node.Sysop||CRLF||" PHONE: "||node.Phone||CRLF||" MODEM: "||node.Baud||CRLF||"  CITY: "||node.City||CRLF||"REGION: "||node.Region||CRLF||"   HUB: "||node.HUB||CRLF||" FLAGS: "||node.Flags||CRLF
  60.  
  61.     If GetUserAccess(ln) >= 255 Then Do
  62.         SendModem "PASSWD: "||node.Password||CRLF||"  COST: "||node.Cost||CRLF
  63.     End
  64.  
  65.     SendModem CRLF
  66.  
  67.     Exit
  68.